<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>删除</button>
    <ul>
        <li>你好牛哦1</li>
        <li>你好牛哦2</li>
        <li>你好牛哦3</li>
        <li>你好牛哦4</li>
        <li>你好牛哦5</li>
    </ul>
    <script>
        let btn=document.querySelector('button');
        let ul=document.querySelector('ul');
        btn.onclick=function(){
            ul.removeChild(ul.children[0]);
            if(ul.children.length==0){
                this.disabled=true;
            }
        }
    </script>
</body>
</html>